package com.tongtailian.www.stir;

import android.content.Context;

import com.tongtailian.www.stir.utils.LogUtil;

import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import static org.junit.Assert.assertEquals;

/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
        int test = 21 | 18;
        int test1 = 01 | 10;
        int test4 = 01 | 04;
        int test2 = 01 | 02 | 03;
        int test3 = 01 | 02 | 03 | 04;
        int[] arr = {01, 02, 03, 04};

        LogUtil.d("test " + test + " test1 " + test1 + " test2 = " + test2 + " test3  = " + test3 + "  test4 = " + test4);

        byte one = 1;
        byte two = 1;
        byte three = 1;
        byte four = 1;
        final int RED = 1;//0x1
        final int GREEN = 1 << 1;//0x2
        final int BLUE = 1 << 2;//0x4
        final int YELLOW = 1 << 3;// 0x8

        LogUtil.d("result = " + RED + "  result2 = " + GREEN + " result3 = " + BLUE + "  result4 = " + YELLOW);

        int test0 = RED + GREEN;
        int test01 = RED + GREEN + BLUE;
        int test02 = RED + GREEN + BLUE + YELLOW;
        LogUtil.d("test0 = " + test0 + "  test01 = " + test01 + " test02 = " + test02);
        assertEquals("com.tongtailian.www.stir", appContext.getPackageName());
    }
}